<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
    (async () => {
        axios.defaults.withCredentials = true
        axios.defaults.baseURL = 'http://localhost:3000'
        const res = await axios.post("/users", {
            headers: {
                'X-Token': '123'
            }
        })
        console.log('data', res.data)
    })()
</script>
Test